/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Forms;

import java.awt.Dimension;
import java.awt.Toolkit;
import javax.swing.JOptionPane;

/**
 *
 * @author Documents
 */
public class MainMenu extends javax.swing.JFrame {

    /**
     * Creates new form MainMenu
     */
    public MainMenu() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTabbed = new javax.swing.JTabbedPane();
        jPanelHeThong = new javax.swing.JPanel();
        jButtonDNhap = new javax.swing.JButton();
        jButtonDoiMK = new javax.swing.JButton();
        jButtonDXuat = new javax.swing.JButton();
        jButtonThoat = new javax.swing.JButton();
        jPanelQuanLy = new javax.swing.JPanel();
        jButtonBNhan = new javax.swing.JButton();
        jButtonNgDung = new javax.swing.JButton();
        jButtonNVien = new javax.swing.JButton();
        jButtonThKe = new javax.swing.JButton();
        jPanelTroGiup = new javax.swing.JPanel();
        jButton14 = new javax.swing.JButton();
        jButton15 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setResizable(false);

        jTabbed.setBackground(new java.awt.Color(255, 255, 204));

        jPanelHeThong.setBackground(new java.awt.Color(204, 255, 153));

        jButtonDNhap.setBackground(new java.awt.Color(255, 255, 255));
        jButtonDNhap.setText("Đăng nhập");
        jButtonDNhap.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonDNhap.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonDNhap.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonDNhapActionPerformed(evt);
            }
        });

        jButtonDoiMK.setText("Đổi mật khẩu");
        jButtonDoiMK.setEnabled(false);
        jButtonDoiMK.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonDoiMK.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonDoiMK.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonDoiMKActionPerformed(evt);
            }
        });

        jButtonDXuat.setText("Đăng xuất");
        jButtonDXuat.setEnabled(false);
        jButtonDXuat.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonDXuat.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonDXuat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonDXuatActionPerformed(evt);
            }
        });

        jButtonThoat.setText("Thoát ");
        jButtonThoat.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonThoat.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonThoat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonThoatActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelHeThongLayout = new javax.swing.GroupLayout(jPanelHeThong);
        jPanelHeThong.setLayout(jPanelHeThongLayout);
        jPanelHeThongLayout.setHorizontalGroup(
            jPanelHeThongLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelHeThongLayout.createSequentialGroup()
                .addContainerGap(86, Short.MAX_VALUE)
                .addGroup(jPanelHeThongLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jButtonDXuat, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButtonDNhap, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(40, 40, 40)
                .addGroup(jPanelHeThongLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButtonDoiMK)
                    .addComponent(jButtonThoat, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(89, 89, 89))
        );
        jPanelHeThongLayout.setVerticalGroup(
            jPanelHeThongLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelHeThongLayout.createSequentialGroup()
                .addGap(47, 47, 47)
                .addGroup(jPanelHeThongLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jButtonDNhap, javax.swing.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)
                    .addComponent(jButtonDoiMK, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(37, 37, 37)
                .addGroup(jPanelHeThongLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jButtonDXuat, javax.swing.GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE)
                    .addComponent(jButtonThoat, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(78, Short.MAX_VALUE))
        );

        jTabbed.addTab("Hệ thống", jPanelHeThong);

        jPanelQuanLy.setBackground(new java.awt.Color(255, 255, 204));
        jPanelQuanLy.setForeground(new java.awt.Color(255, 255, 255));

        jButtonBNhan.setText("Bệnh nhân");
        jButtonBNhan.setEnabled(false);
        jButtonBNhan.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonBNhan.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonBNhan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonBNhanActionPerformed(evt);
            }
        });

        jButtonNgDung.setText("Người dùng");
        jButtonNgDung.setEnabled(false);
        jButtonNgDung.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonNgDung.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonNgDung.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonNgDungActionPerformed(evt);
            }
        });

        jButtonNVien.setText("Nhân viên");
        jButtonNVien.setEnabled(false);
        jButtonNVien.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonNVien.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonNVien.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonNVienActionPerformed(evt);
            }
        });

        jButtonThKe.setBackground(new java.awt.Color(255, 255, 255));
        jButtonThKe.setText("Thống kê");
        jButtonThKe.setEnabled(false);
        jButtonThKe.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonThKe.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        javax.swing.GroupLayout jPanelQuanLyLayout = new javax.swing.GroupLayout(jPanelQuanLy);
        jPanelQuanLy.setLayout(jPanelQuanLyLayout);
        jPanelQuanLyLayout.setHorizontalGroup(
            jPanelQuanLyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelQuanLyLayout.createSequentialGroup()
                .addGap(80, 80, 80)
                .addGroup(jPanelQuanLyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jButtonNgDung, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButtonBNhan, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(53, 53, 53)
                .addGroup(jPanelQuanLyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButtonThKe, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButtonNVien, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(0, 74, Short.MAX_VALUE))
        );
        jPanelQuanLyLayout.setVerticalGroup(
            jPanelQuanLyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelQuanLyLayout.createSequentialGroup()
                .addGap(57, 57, 57)
                .addGroup(jPanelQuanLyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jButtonBNhan, javax.swing.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)
                    .addComponent(jButtonNVien, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE)
                .addGroup(jPanelQuanLyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jButtonThKe, javax.swing.GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE)
                    .addComponent(jButtonNgDung, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(76, 76, 76))
        );

        jTabbed.addTab("Quản lý", jPanelQuanLy);

        jPanelTroGiup.setBackground(new java.awt.Color(255, 204, 255));

        jButton14.setText("Thông tin");
        jButton14.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton14.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        jButton15.setText("Cập nhật");
        jButton15.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton15.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButton15.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton15ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelTroGiupLayout = new javax.swing.GroupLayout(jPanelTroGiup);
        jPanelTroGiup.setLayout(jPanelTroGiupLayout);
        jPanelTroGiupLayout.setHorizontalGroup(
            jPanelTroGiupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelTroGiupLayout.createSequentialGroup()
                .addGap(72, 72, 72)
                .addComponent(jButton14, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(39, 39, 39)
                .addComponent(jButton15, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(80, Short.MAX_VALUE))
        );
        jPanelTroGiupLayout.setVerticalGroup(
            jPanelTroGiupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelTroGiupLayout.createSequentialGroup()
                .addGap(106, 106, 106)
                .addGroup(jPanelTroGiupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jButton14, javax.swing.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)
                    .addComponent(jButton15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(135, Short.MAX_VALUE))
        );

        jTabbed.addTab("Trợ giúp", jPanelTroGiup);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbed, javax.swing.GroupLayout.Alignment.TRAILING)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbed)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButton15ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton15ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButton15ActionPerformed

    private void jButtonNgDungActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonNgDungActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonNgDungActionPerformed

    private void jButtonBNhanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBNhanActionPerformed
        DanhSachBenhNhan dsbn = new DanhSachBenhNhan();
        dsbn.setVisible(true);
    }//GEN-LAST:event_jButtonBNhanActionPerformed

    private void jButtonThoatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonThoatActionPerformed
        if(JOptionPane.showConfirmDialog(null, "Bạn có chắc muốn thoát", "Thông báo", JOptionPane.YES_NO_OPTION)==JOptionPane.YES_OPTION)
            System.exit(0);
    }//GEN-LAST:event_jButtonThoatActionPerformed

    private void jButtonDoiMKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDoiMKActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonDoiMKActionPerformed

    private void jButtonDNhapActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDNhapActionPerformed
        DangNhap dn = new DangNhap(this, false);
        dn.setVisible(true);
    }//GEN-LAST:event_jButtonDNhapActionPerformed

    private void jButtonNVienActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonNVienActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonNVienActionPerformed

    private void jButtonDXuatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDXuatActionPerformed
        MainMenu.jButtonDNhap.setEnabled(true);
        MainMenu.jButtonDoiMK.setEnabled(false);
        MainMenu.jButtonDXuat.setEnabled(false);
        MainMenu.jButtonBNhan.setEnabled(false);
        MainMenu.jButtonNVien.setEnabled(false);
        MainMenu.jButtonThKe.setEnabled(false);
        MainMenu.jButtonNgDung.setEnabled(false);
    }//GEN-LAST:event_jButtonDXuatActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(MainMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(MainMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(MainMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(MainMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                MainMenu mn = new MainMenu();
                Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
                mn.setLocation((screen.width - mn.getWidth())/2, (screen.height - mn.getHeight())/2);
                mn.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton14;
    private javax.swing.JButton jButton15;
    public static javax.swing.JButton jButtonBNhan;
    public static javax.swing.JButton jButtonDNhap;
    protected static javax.swing.JButton jButtonDXuat;
    public static javax.swing.JButton jButtonDoiMK;
    public static javax.swing.JButton jButtonNVien;
    public static javax.swing.JButton jButtonNgDung;
    public static javax.swing.JButton jButtonThKe;
    public static javax.swing.JButton jButtonThoat;
    private javax.swing.JPanel jPanelHeThong;
    private javax.swing.JPanel jPanelQuanLy;
    private javax.swing.JPanel jPanelTroGiup;
    private javax.swing.JTabbedPane jTabbed;
    // End of variables declaration//GEN-END:variables
}
